#include "syscall.h"

void initTests(){
	int lock1 = -1;
	int lock2 = -1;
	int cond1 = -1;
	int MV1 = -1;
	
	Printing("T1: initializing everything!\n", ConsoleOutput, 0, 0);
	
	lock1 = CreateLock("lock1", 5);
	/*Printing("lock1 index = %i\n", ConsoleOutput, lock1, 0);*/
	Printing("T1: lock1 created!\n", ConsoleOutput, 0, 0);
	if(lock1 == -1){
		Printing("T1: Error when trying to create lock 1!\n", ConsoleOutput, 0, 0);
	}
	
}

void testRelease(){
	Printing("T1: attempting to acquire lock1\n", ConsoleOutput, 0, 0);
	AcquireLock("lock1", 5);
	Printing("T1: lock1 acquired! attempting to release lock1\n", ConsoleOutput, 0, 0);
	ReleaseLock("lock1", 5);
	Printing("T1: lock1 released!\n", ConsoleOutput, 0, 0);
}

int main(){
	initTests();
	testRelease();
	Exit(11);
}